Git 设置 HTTP 和 SOCKS5 代理

命令行配置

# 配置 http 代理
git config --global http.proxy "http://127.0.0.1:7890"
git config --global https.proxy "http://127.0.0.1:7890"

# 配置 socks5 代理
git config --global http.proxy "socks5://127.0.0.1:7890"
git config --global https.proxy "socks5://127.0.0.1:7890"

直接修改配置文件

修改 Git 用户配置文件:$HOME/.gitconfig (也就是 C:\Users\Jaime\.gitconfig)。

[http]
    proxy = http://127.0.0.1:7890
[https]
    proxy = http://127.0.0.1:7890